package io.renren.modules.newBackground.shanghaiCmcc.v2.example;


import io.renren.modules.newBackground.shanghaiCmcc.v2.client.OpenapiHttpCilent;

public class ThreadMain implements Runnable{

	private int num;
	
	public ThreadMain(int i) {
		this.num = i;
	}

	@Override
	public void run() {
		
		OpenapiHttpCilent client = new OpenapiHttpCilent("A0000186", "46vag3mn9M0srWuiMny64Pf3XacB8WFi");
		
		try {
			for(int i = 0;i < this.num; i++) {
				String response = client.call("Test", "transactionId流水号","{\"a\":\"1\"}");
				System.out.println("线程"+num+" 第"+i+"次调用;结果: "+response);	
				/*synchronized (TestMain.class) {
					TestMain.count++;
					System.out.println(TestMain.count);
				}*/
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
		
	}

}
